import pygame


class Mine(pygame.sprite.Sprite):
    def __init__(self, initial_position, filename="resources/images/bomb.png"):
        pygame.sprite.Sprite.__init__(self)
        self.image = pygame.transform.scale2x(pygame.image.load(filename))
        self.tempImg = pygame.transform.scale(self.image, (172//5, 34))
        self.rect = self.tempImg.get_rect()
        self.rect.topleft = initial_position

        self.size = self.image.get_size()
        self.show_size_x, self.show_size_y = (self.size[0] // 5, self.size[1])
        self.frame_no = 0

    def show(self):
        self.frame_no += 1
        self.frame_no %= 5
        pygame.time.delay(100)
        # screen.blit(self.image, (0, 0), (self.frame_no * self.show_size_x, 0, self.show_size_x, self.show_size_y))
